package com.boe.rnmf.pkg.test.testcase;

import com.boe.rnmf.entity.UserEntity;
import com.boe.rnmf.pkg.service.UserService;
import com.boe.rnmf.pkg.test.Tester;
import javax.annotation.Resource;
import org.junit.Test;
import org.springframework.util.Assert;

public class UserTestCase extends Tester{

  @Resource
  private UserService userService;

  @Test
  public void testInsert(){
    UserEntity userEntity = new UserEntity();
    userEntity.setAccount("loginname");
    userEntity.setName("name");
    userEntity.setEmail("test@boe.com.cn");
    userEntity.setPassword("pwd");
    userService.save(userEntity);
    Assert.notNull(userEntity.getId(),"id must be not null");
  }
}
